<template>
  <div id="app">
    <background-music></background-music>
    <home v-if="active === 0" />
    <first v-else-if="active === 1" />
    <second v-else-if="active === 2" />
    <third v-else-if="active === 3" />
    <fourth v-else-if="active === 4" />
    <end v-else/>
    <div class="next-page">
      <img src="./assets/down.png" @click="next" />
    </div>
  </div>
</template>

<script>
import backgroundMusic from './components/Background-music.vue'
import Home from './components/Home'
import First from './components/First'
import Second from './components/Second'
import Third from './components/Third'
import Fourth from './components/Fourth'
import End from './components/End'
export default {
  name: 'App',
  components: {
    backgroundMusic,
    Home,
    First,
    Second,
    Third,
    Fourth,
    End
  },
  data () {
    return {
      active: 0
    }
  },
  methods: {
    next () {
      if (++this.active && this.active === 6) {
        this.active = 0
      }
    }
  }
}
</script>

<style lang="scss">
html {
  background-color: #fce8ec;
  color: #003952;
}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  .next-page {
    position: fixed;
    bottom: 0.25rem;
    width: 100%;
    img {
      position: relative;
      top: 0;
      animation: down 1s linear infinite;
    }
  }
}
@keyframes down {
  from {
    top: 0;
  }
  to {
    top: 5px;
  }
}
</style>

